/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tuitionmanagement.DAO;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import tuitionmanagement.util.DBUtil;

/**
 *
 * @author lab
 */
public class TestDAO {
String SQL_SELECT="select * from [Student]";
public void Read(){
try{
    Connection con=DBUtil.getConn();
    PreparedStatement ps=con.prepareStatement(SQL_SELECT);
    ResultSet rs=ps.executeQuery();
    while(rs.next()){
        System.out.println(rs.getInt("StudentId"));
    }
}
        catch (SQLException ex) {
            Logger.getLogger(TestDAO.class.getName()).log(Level.SEVERE, null, ex);
        }}
}
